import { createApp } from 'vue'
import { createPinia } from 'pinia'
// PrimeVue UI组件库
import PrimeVue from 'primevue/config';
import Aura from '@primeuix/themes/aura';
// Button按钮
import Button from "primevue/button";
// 数据表
import DataTable from 'primevue/datatable'
// 数据列
import Column from 'primevue/column'
import Toolbar from 'primevue/Toolbar'
import InputText from 'primevue/InputText'
import InputIcon from 'primevue/InputIcon'
import IconField from 'primevue/IconField'
import Dialog from 'primevue/dialog';
import ToastService from 'primevue/toastservice';
import Timeline from 'primevue/timeline';
import Card from 'primevue/card';
import Divider from 'primevue/divider';

import 'primeicons/primeicons.css';
import App from './App.vue';
import router from './router';

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(PrimeVue,{
  ripple: true,
  theme: {
    preset: Aura,
    options: {
      prefix: 'p',
      // darkModeSelector: '.my-app-dark',
      darkModeSelector: 'system',
      cssLayer: {
        name: 'primevue',
        order: 'app-styles, primevue, another-css-library'
      }
    }
  }
});
app.use(ToastService);
app.component('Button', Button);
app.component('DataTable',DataTable);
app.component('Column',Column);
app.component('Toolbar',Toolbar);
app.component('InputText',InputText);
app.component('InputIcon',InputIcon);
app.component('IconField',IconField);
app.component('Dialog',Dialog);
app.component('Timeline',Timeline);
app.component('Card',Card);
app.component('Divider',Divider);
app.mount('#app')
